#ifndef INTERATIONREDIS
#define INTERATIONREDIS

#include "RedisConnect.h"
#include "interationjson.hpp"
#include "myLog4.h"

extern const std::string REDISIP;
extern const int REDISPORT;
extern const std::string REDISPASSWORD;

void initializeRedis(const std::string& IP = REDISIP, const int& PORT = REDISPORT,
    const std::string& PASSWORD = REDISPASSWORD);

void subscriptionInfo2Redis(const std::string& uid, const std::string& postData, 
    const std::string& IP = REDISIP, const int& PORT = REDISPORT, const std::string& PASSWORD = REDISPASSWORD);

std::string getSingnalSubscriptionInfoFromRedis(const std::string& uid,
    const std::string& IP = REDISIP, const int& PORT = REDISPORT, const std::string& PASSWORD = REDISPASSWORD);

json getGpsFromRedis(const std::string& uid,
    const std::string& IP = REDISIP, const int& PORT = REDISPORT, const std::string& PASSWORD = REDISPASSWORD);

json getMultiGpsFromRedis(vector<string> uids,
    const std::string& IP = REDISIP, const int& PORT = REDISPORT, const std::string& PASSWORD = REDISPASSWORD);

#endif